//
//  WBSearchBar.m
//  微博项目
//
//  Created by ma c on 16/8/15.
//  Copyright (c) 2016年 beijing. All rights reserved.
//

#import "WBSearchBar.h"
#import "UIView+WBExtension.h"

@implementation WBSearchBar

+ (instancetype)searchBar{
    return [[self alloc]init];
}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.font = [UIFont systemFontOfSize:15];
        self.placeholder = @"请输入搜索条件";
        self.background = [UIImage imageNamed:@"searchbar_textfield_background"];
        UIImageView * searchIcon = [[UIImageView alloc]init];
        searchIcon.image = [UIImage imageNamed:@"searchbar_textfield_search_icon"];
        searchIcon.width = 30;
        searchIcon.height = 30;
        searchIcon.contentMode = UIViewContentModeCenter;
        self.leftView = searchIcon;
        self.leftViewMode = UITextFieldViewModeAlways;
        
    }
    
    return self;
}

@end
